//
//  WBDemoViewController.swift
//  仿新浪微博
//
//  Created by 陈强 on 17/4/20.
//  Copyright © 2017年 强. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        //设置标题
        title = "第\(navigationController?.childViewControllers.count ?? 0)个"
    }

    func nextVC() {
        let vc = WBDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
        
    }
   
}


extension WBDemoViewController{
    //重写父类方法
    override func setupUI() {
        super.setupUI()
        //设置右侧控制器
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(nextVC))
    }
}
